<template>
	<view class="splash-container">
		<image class="logo" src="../../static/images/1751422720515.jpg" mode="aspectFit"></image>
		<text class="app-name">东软颐养中心医工端</text>
		<text class="slogan">为您提供更便利的服务</text>
	</view>
</template>

<script>
	export default{
		mounted(){
			// 启动页显示3秒后判断登录状态
			setTimeout(() => {
				const isLogin = uni.getStorageSync('isLogin');
				if(isLogin){
					uni.reLaunch({ url:'/pages/home/home' });
				}else{
					uni.reLaunch({ url:'/pages/login/login' });
				}
			},3000);
		}
	}
</script>

<style scoped>
@font-face {
  font-family: 'YouYuan'; /* 自定义字体名称 */
    src: url('../../static/fonts/YouYuan.ttf') format('truetype');
}

.splash-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #ffffff; /* 设置背景色为纯白 */
}

.logo {
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
}

.app-name {
  font-family: 'YouYuan';
  font-size: 24px;
  font-weight: bold;
  background: linear-gradient(to left, #333333, #000000); /* 灰黑渐变 */
  -webkit-background-clip: text;  /* 使用渐变背景裁剪文字 */
  color: transparent;  /* 使文字本身透明，显示背景渐变 */
  margin-bottom: 20px;
}

.slogan {
  font-family: 'YouYuan';
  font-size: 16px;
  background: linear-gradient(to left, #333333, #000000); /* 灰黑渐变 */
  -webkit-background-clip: text;
  color: transparent;
}
</style>
